// import React from 'react';
import { BrowserRouter as Router, Route, Switch } from "react-router-dom"
import Loadable from "./loadable.jsx";
// import Oauth from "./router/oAuth";
import Home from "./views/home/index";//home

const Login = Loadable(() => import('./views/login/index.jsx'))//登录
const Register = Loadable(() => import("./views/register/index.jsx"));//注册
const DetailMore = Loadable(() => import('./views/detail_more/index'))//更多详情
const Detail = Loadable(() => import("./views/detail/index"))//详情
const Experience = Loadable(() => import("./views/experience/index"))
const Wish = Loadable(() => import("./views/wish/index"))//心愿单
const Userinfo = Loadable(() => import("./views/personal/index"))
const UserNumber = Loadable(() => import("./views/userNumber/index"))

function App() {
  return (
    <div>
      <Router>
        <Switch>
          <Route path='/detailMore' component={DetailMore}></Route>
          <Route path='/register' component={Register}></Route>
          <Route path='/login' component={Login}></Route>
          <Route path='/detail' component={Detail}></Route>
          {/* <Oauth path='' component={}></Oauth> */}
          <Route path='/experience' component={Experience}></Route>
          <Route path='/userinfo' component={Userinfo}></Route>
          <Route path='/userNumber' component={UserNumber}></Route>

          <Route path='/wish' component={Wish}></Route>
          <Route path='/' exact component={Home}></Route>
        </Switch>
      </Router>
    </div>

  );
}

export default App;
